import { http } from "@/utils/http";
import type { CompanyVo } from "@/api/models";
/** 刷新token */
export const myCompany = () => {
  return http.get<CompanyVo>("/project/company/my");
};
// 加入公司/project/company/join
export const joinCompany = code => {
  return http.request("post", "/project/company/join", { data: code });
};
//机构列表/project/industry/list
export const getIndustry = () => {
  return http.request("get", "/project/industry/list");
};
//创建公司/project/company/create
export const createCompany = data => {
  return http.request("post", "/project/company/create", { data: data });
};
//创建部门/project/company/user/admin/create-group
export const createGroup = data => {
  return http.request("post", "/project/company/user/admin/create-group", {
    data: data
  });
};
//删除部门/project/company/user/admin/delete-group
export const deleteGroup = id => {
  return http.request(
    "delete",
    "/project/company/user/admin/delete-group?companyUserGroupId=" + id
  );
};
//修改公司信息/project/company/admin/update
export const updateCompany = data => {
  return http.request("post", "/project/company/admin/update", { data: data });
};
//修改部门/project/company/user/admin/update-group
export const updateGroup = data => {
  return http.request("put", "/project/company/user/admin/update-group", {
    data: data
  });
};
